package com.xxxx.server.controller;

import com.xxxx.server.pojo.RespBean;
import com.xxxx.server.pojo.RespPageBean;
import com.xxxx.server.pojo.Salary;
import com.xxxx.server.service.IEmployeeService;
import com.xxxx.server.service.impl.SalaryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 员工账套
 *
 * @author zhoubin
 * @since 1.0.0
 */
@RestController
@RequestMapping("/salary/sobcfg")
public class SalarySobCfgController {

    @Autowired
    private SalaryServiceImpl salaryService;
    @Resource
    private IEmployeeService employeeService;

    //查询员工账套
    @GetMapping("/")
    public Map<String, Object> selectSalaries(RespPageBean respPageBean) {
        Map<String, Object> map = salaryService.selectList(respPageBean);

        return map;

    }

    //工资账套
    @GetMapping("/salaries")
    public List<Salary> listSalaries() {
        List<Salary> list = salaryService.list();
        return list;

    }

    //修改工资账套
    @PutMapping("/")
    public RespBean updateSobcfg( Integer eid,Integer sid){

        return employeeService.updateSobcfg(eid,sid);

    }

}
